#include <cstdio>
#include <vector>
#include <cstring>
using namespace std;
const int N = 205;
int n, m;
vector <int> a[N];
bool visit[N];
bool col[N];
bool flag;
void dfs (int x) {
	if (flag) {
		return;
	} 
	if (visit[x]) {
		return;
	}
	visit[x] = 1;
	for (unsigned i = 0; i < a[x].size(); i++) {
		if (col[a[x][i]] == col[x] && visit[a[x][i]]) {
			flag = 1;
			return;
		} else {
			if (col[x] == 1) {
				col[a[x][i]] = 0;
			} else {
				col[a[x][i]] = 1;
			}
		}
		dfs (a[x][i]);
	}
}
int main() {
	while (~scanf ("%d", &n)) {
		int x, y;
		flag = 0;
		memset(col, 0, sizeof(col));
		memset(visit, 0, sizeof(visit));
		scanf ("%d", &m);
		for (int i = 0; i < n; i++) {
			a[i].clear();
		}
		for (unsigned i = 1; i <= m; i++) {
			scanf ("%d%d", &x, &y);
			a[x].push_back(y);
			a[y].push_back(x);
		}
		col[0] = 1;
		dfs(0);
		if (flag) {
			printf ("NOT BICOLORABLE\n");
		} else {
			printf ("BICOLORABLE\n");
		}
	}
	return 0;
}